<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/10/22
 * Time: 16:04
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\common\validate;


class OrderDetail extends Base
{
    protected $rule = [
        "relname" => "require|max:20",
        "sex" => "require|integer",
        "mobile" => "require|mobile",
        "wx" => "require|alphaDash",
        "express_order" => "require",
        "weight" => "require",
        "xian" => "require",
        "description" => "require",
        "is_lou" => "require",
        "start_address" => "require",
        "end_address" => "require",
        "address_detail" => "require",
        "idCard" => "idCard",
        "mark" => "max:200",
        "qu_lat"=>"require",
        "address_qu_info"=>"require",
        "qcode"=>"require",
        "address_lat"=>"require"
    ];
    protected $message = [
        "relname.require" => "请输入姓名",
        "relname.max" => "姓名输入太长",
        "sex.require" => "请选择性别",
        "mobile.require" => "请输入手机号",
        "mobile.mobile" => "手机号输入错误",
        "wx.require" => "请输入微信号",
        "wx.alphaNum" => "微信号只能是字符数字-_",
        "express_order.require" => "请输入快递单号",
        "weight.require" => "请选择重量",
        "xian.require" => "请选择抢单限制",
        "description.require" => "请选择体积描述",
        "is_lou.require" => "请选择是否上楼",
        "start_address.require" => "请选择取货地址",
        "end_address.require" => "请选择送货地址",
        "address_detail.require" => "请输入送货地址详情",
        "idCard.idCard" => "身份证号格式错误",
        "mark.max" => "备注信息太长",
        "qu_lat.require"=>"请选择取货地址",
        "address_qu_info.require"=>"请输入取货地址详情",
        "qcode.require"=>"请输入取件码",
        "address_lat"=>"送货地址错误"
    ];
    protected $scene = [
        "add" => ["relname", "sex", 'mobile', 'wx', 'express_order', 'weight', 'xian', 'description', 'is_lou', 'start_address', 'end_address', 'address_detail', 'idCard', 'mark','qu_lat','address_qu_info','qcode',"address_lat"]
    ];
}